(include "sys/class.inc")

(def-class 'ctx)
(dec-method :box 'gui/ctx/box :static '(r0 r7 r8 r9 r10))
(dec-method :filled_box 'gui/ctx/filled_box :static '(r0 r7 r8 r9 r10))
(dec-method :blit 'gui/ctx/blit :static '(r0 r1 r2 r7 r8 r9 r10))
(dec-method :set_color 'gui/ctx/set_color :static '(r0 r1))
(dec-method :panel 'gui/ctx/panel :static '(r0 r1 r2 r3 r7 r8 r9 r10))
(dec-method :brighter 'gui/ctx/brighter :static '(r1) '(r1))
(dec-method :darker 'gui/ctx/darker :static '(r1) '(r1))

;(dec-method :debug 'gui/ctx/debug :static '(r0 r7 r8 r9 r10))

(def-struct 'ctx)
	(ptr 'sdl_ctx 'dirty_region)
	(int 'x 'y)
(def-struct-end)

(defcvar 'argb_black 0xff000000)
(defcvar 'argb_white 0xffffffff)
(defcvar 'argb_blue 0xff0000ff)
(defcvar 'argb_green 0xff00ff00)
(defcvar 'argb_red 0xffff0000)
(defcvar 'argb_cyan 0xff00ffff)
(defcvar 'argb_yellow 0xffffff00)
(defcvar 'argb_magenta 0xffff00ff)

(defcvar 'argb_grey1 0xff101010)
(defcvar 'argb_grey2 0xff202020)
(defcvar 'argb_grey3 0xff303030)
(defcvar 'argb_grey4 0xff404040)
(defcvar 'argb_grey5 0xff505050)
(defcvar 'argb_grey6 0xff606060)
(defcvar 'argb_grey7 0xff707070)
(defcvar 'argb_grey8 0xff808080)
(defcvar 'argb_grey9 0xff909090)
(defcvar 'argb_grey10 0xffa0a0a0)
(defcvar 'argb_grey11 0xffb0b0b0)
(defcvar 'argb_grey12 0xffc0c0c0)
(defcvar 'argb_grey13 0xffd0d0d0)
(defcvar 'argb_grey14 0xffe0e0e0)
(defcvar 'argb_grey15 0xfff0f0f0)
